package com.example.publishsubscrible.header;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class HeaderConsumer {

    @RabbitListener(queues = HeaderConfig.HEADER_QUEUE_NAME)
    public void msgHandler(String msg) {
        System.out.println("msg = " + msg);
    }

    @RabbitListener(queues = HeaderConfig.HEADER_QUEUE_NAME2)
    public void msgHandler2(String msg) {
        System.out.println("msg2 = " + msg);
    }
}
